/**
 * \file fs/mount.h
 * \author Davide Gessa
 * \date 12-22-09
 */
#ifndef MOUNT_H
#define MOUNT_H

#include <fs/fs.h>

#define MOUNT_STATE_OK	1
#define MOUNT_STATE_MP	2
#define MOUNT_STATE_MD	3
#define MOUNT_STATE_MF	4
#define MOUNT_STATE_FE	5
#define MOUNT_STATE_PM	6
#define MOUNT_STATE_DM	7


/**
 * Struttura per memorizzare i mount point
 */
typedef struct mount_point_p
{
	char path[MOUNT_POINT_NAME_SIZE];		///< Path del mountpoint
	char dev[MOUNT_POINT_NAME_SIZE];		///< Path del device file
	char fs[MOUNT_POINT_NAME_SIZE];			///< Filesystem
	
	inode_t *root;							///< Root node
	inode_t *childs;						///< Figli
	
	struct mount_point_p *next;				///< Prossimo mountpoint
} mount_point_t;


mount_point_t *fs_mountpoints;	///< Lista mount points


uint32_t fs_mount(char *, char *, char *, uint32_t);
uint32_t fs_umount(char *);
uint32_t fs_get_mount_point(char *, char *);

uint32_t fs_getxmp(uint32_t, mount_point_t **);

#endif
